import { ElMessageBox } from "element-plus";

export default function warningConfirm(text: string) {
    return new Promise((resolve, reject) => {
        ElMessageBox.confirm(text, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
        }).then(() => {
            resolve(true);
        }).catch(() => {
            reject(false);
        });
    }).catch(() => {
        return false;
    });
}